package nj.yb.entity.group;

import com.alibaba.fastjson.annotation.JSONField;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

public class GroupChat {
    @JSONField(ordinal = 1)
    private Long id;
    @JSONField(ordinal = 2)
    private String groupName;
    @JSONField(ordinal = 3)
    //群聊头像
    private String groupAvatar;
    @JSONField(ordinal = 4)
    private String creator;
    @JSONField(ordinal = 5)
    private LocalDateTime createTime;
    //群聊描述
    @JSONField(ordinal = 6)
    private String description;

    public GroupChat(String groupName, String creator,LocalDateTime createTime) {
        this.creator = creator;
        this.groupName = groupName;
        this.createTime = createTime;
    }

    public GroupChat(Long id, String groupName, String groupAvatar, LocalDateTime createTime, String description) {
        this.id = id;
        this.groupName = groupName;
        this.groupAvatar = groupAvatar;
        this.createTime = createTime;
        this.description = description;
    }

    public GroupChat() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getGroupAvatar() {
        return groupAvatar;
    }

    public void setGroupAvatar(String groupAvatar) {
        this.groupAvatar = groupAvatar;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    @Override
    public String toString() {
        return "GroupChat{" +
                "id=" + id +
                ", groupName='" + groupName + '\'' +
                ", groupAvatar='" + groupAvatar + '\'' +
                ", creator='" + creator + '\'' +
                ", createTime=" + createTime +
                ", description='" + description + '\'' +
                '}';
    }
}
